﻿//JumbotCms_4.1 Final
using System;
using System.Data;
using JumbotCms.Common;

namespace JumbotCms.WebFile.MTag
{
    public partial class _view_membermanage_index : JumbotCms.API.UserCenter
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            User_Load("", "html");
            string PageStr = GetPageHtml("mtag_membermanage");
            string mtagid = Str2Str(q("mtagid"));
            //是不是创始人
            if (IsMTagFounder(UserId, mtagid))
            {
                doh.Reset();
                doh.SqlCmd = "SELECT a.id as mtagid,a.Title as mtagname,a.Img as mtagImg,a.MemberTotal as mtagMemberTotal,a.Proclaim as mtagProclaim,b.id as mtagsortid,b.Title as mtagsortname FROM " +
                    " [jcms_normal_mtag] as a left join [jcms_normal_mtag_sort] as b" +
                    " on b.id=a.SortId " +
                    " WHERE a.id=" + mtagid;
                DataTable dtMTag = doh.GetDataTable();
                for (int i = 0; i < dtMTag.Columns.Count; i++)
                {
                    PageStr = PageStr.Replace("{$_" + dtMTag.Columns[i].ColumnName.ToLower() + "$}", dtMTag.Rows[0][i].ToString());
                }
                Response.Write(PageStr);
                dtMTag.Clear();
            }
            else
            {
                Response.Write("权限不足");
                Response.End();
            }
        }
    }
}
